/*
 * @Author: your name
 * @Date: 2021-07-17 10:58:47
 * @LastEditTime: 2021-07-21 17:31:23
 * @LastEditors: Mcfly
 * @Description: In User Settings Edit
 * @FilePath: \FTTfly\Ctrl\AttiCtrl.h
 */
#ifndef __ATTICTRL_H_
#define __ATTICTRL_H_

#include "stdint.h"
#include "PID.h"
#include "Atti.h"

#define THROTTLE_MIN 2500
#define THROTTLE_MAX 5312
typedef struct
{
    PIDctrler PIDpos[3];
    PIDctrler PIDomega[3];
    float deltaT;
} AttiCtrl;

AttiCtrl *AttiCtrl_Init(void);
void AttiCtrl_UpdateFrame(AttiCtrl *attiCtrl, Atti *nowAtti, Atti *expectAtti, float throttle);

#endif
